#!/bin/sh

# This shell script builds everyting on an TravisCI Linux (Ubunutu) worker

set -ev

export UNATTENDED="--assume-yes"

export MAKE_PARALLEL="-j $(nproc)"

export PDF2HTMLEX_BRANCH=$TRAVIS_BRANCH

export PDF2HTMLEX_PREFIX=/usr/local

export PDF2HTMLEX_PATH=/usr/local/bin/pdf2htmlEX

# Ensure all Apt packages are installed with no user interaction
#
export DEBIAN_FRONTEND=noninteractive

################
# do the build

./buildScripts/versionEnvs
./buildScripts/reportEnvs
./buildScripts/getBuildToolsApt
./buildScripts/getDevLibrariesApt
./buildScripts/getPoppler
./buildScripts/buildPoppler
./buildScripts/getFontforge
./buildScripts/buildFontforge
./buildScripts/buildPdf2htmlEX
./buildScripts/installPdf2htmlEX
# ./buildScripts/runTests
# ./buildScripts/createAppImage
# ./buildScripts/createDebianPackage
#./buildScripts/createContainerUbuntuImageFromDeb
#./buildScripts/uploadGitHubRelease
#./buildScripts/uploadContainerImage
